package org.example.campus_sys_backend.controller;

import org.example.campus_sys_backend.model.CourseInfo;
import org.example.campus_sys_backend.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/course")
public class CourseController {
    @Autowired
    public CourseService courseService;
    @RequestMapping("/add")
    public Boolean addCourse(CourseInfo courseInfo){
        if (courseInfo != null){
            courseService.insertCourse(courseInfo);
            return true;
        }
          return false;
    }
}
